package com.sg.dto.integration.component;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc DataFilterSpecRecByTypeCodeDto
 * @使用场景
 */
@Data
public class DataFilterSpecRecByTypeCodeDto
        extends BaseDto
        implements Serializable {

    /**
     * 通用主键ID
     */
    @ApiModelProperty("通用主键ID")
    private String commPrimaryKey;

    /**
     * 通用编码标识
     */
    @ApiModelProperty("通用编码标识")
    private String comCode;

    /**
     * 通用数值字段（整数型）
     */
    @ApiModelProperty("通用数值字段（整数型）")
    private Long comNumField;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        DataFilterSpecRecByTypeCodeDto that = (DataFilterSpecRecByTypeCodeDto) o;
        return (
                commPrimaryKey == that.commPrimaryKey &&
                        comCode == that.comCode &&
                        comNumField == that.comNumField
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), commPrimaryKey, comCode, comNumField);
    }

}
